<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
	<title>会议客户列表</title>
<head th:replace="top::html">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 2 | Starter</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
	name="viewport">

<body class="fixed hold-transition skin-blue">
	<div class="wrapper">
 <!-- Main Header -->
    <div th:replace="tophtml::html" ></div>

  <!-- Left side column. contains the logo and sidebar -->
  
  <div th:replace="left::html" ></div>
	

		<!-- Content Wrapper. Contains page content -->
		<div class="content-wrapper">
			<!-- Content Header (Page header) -->
			<section class="content-header">
				<h1>
					客户列表 <small>Optional description</small>
				</h1>
				<ol class="breadcrumb">
					<li><a href="/index"><i class="fa fa-dashboard"></i>用户中心</a></li>
					<li><a href="/conference/conferenceList">会议管理</a></li>
					<li><a href="">会议匹配客户</a></li>
				</ol>
			</section>

			<!-- Main content -->
			<section class="content container-fluid">


             <input type="hidden" th:value="${conferenceId}" class="form-control" id="conferenceId">
				<div class="box">
					<div class="box-header with-border">
						<button type="button" class="btn btn-success" id="addPerson">添加会议客户</button>
					</div>
					<!-- /.box-header -->
					<div class="box-body">
						<table class="table table-bordered">
							<tbody>
								<tr>
									<th style="width: 10px">#</th>
									<th>会议名称</th>
									<th>客户名称</th>
									<th>操作</th>
								</tr>
								
								
								<tr th:each="confOfAttr,confOfAttrIndex : ${pageInfo.list}">
									<td th:text="${confOfAttrIndex.index+1}"></td>
									
									 <td title="查看会议详情">
                                        <a th:href="@{'/conference/showDetail?conferenceId='+${confOfAttr.conferenceId}}" th:text="${confOfAttr.conferenceName}">查看详情</a>
                                    </td>
									
									
									 <td title="查看客户详情">
                                        <a th:href="@{'/customer/showDetail?customerId='+${confOfAttr.customerId}}" th:text="${confOfAttr.customerName}">查看详情</a>
                                    </td>
									
									
									<td>
									<a th:href="@{'/customer/updateCustomer?pid='+${confOfAttr.customerId}}">修改</a>
									<a th:href="@{/confofattr/deleteConferenceCustomer(conferencePid=${confOfAttr.conferenceId},customerId=${confOfAttr.customerId})}">删除</a>
									
									</td> 
								</tr>
								
								<tr>
									<td colspan="4">
										<p>
											第 <span th:text="${pageInfo.pageNum} "></span>页&nbsp;&nbsp;&nbsp;每页
											<span th:text="${pageInfo.pageSize}"></span>条&nbsp;&nbsp;&nbsp;共
											<span th:text="${pageInfo.total}"></span> 条记录
										</p>
									</td>
								</tr>

							</tbody>
						</table>
					</div>
					<!-- /.box-body -->
					<div class="box-footer clearfix">
						<ul id="page" class="pagination pagination-sm no-margin pull-right">
							<!-- 首页 -->
							<li>
								<a th:href="@{'/confofattr/conferenceCustomer?pageNum='+${pageInfo.firstPage}+'&&pid='+${pid}}">首页</a>
							</li>
							<!--上一页-->
							<li th:if="${pageInfo.hasPreviousPage}">
								<a th:href="@{'/confofattr/conferenceCustomer?pageNum='+${pageInfo.prePage}+'&&pid='+${pid}}">
									<i class="fa fa-angle-left"></i>&nbsp;上一页
								</a>
							</li>
							<!--循环遍历连续显示的页面，若是当前页就高亮显示，并且没有链接-->
							<th:block th:each="nav : ${pageInfo.navigatepageNums}">
								<li th:class="${nav==pageInfo.pageNum}?'active':''">
									<a th:href="@{'/confofattr/conferenceCustomer?pageNum='+${nav}+'&&pid='+${pid}}" th:text="${nav}"></a>
								</li>
							</th:block>
							<!-- 下一页 -->
							<th:block th:if="${pageInfo.hasNextPage}">
								<li>
									<a th:href="@{'/confofattr/conferenceCustomer?pageNum='+${pageInfo.nextPage}+'&&pid='+${pid}}">下一页&nbsp;
										<i class="fa fa-angle-right"></i>
									</a>
								</li>
							</th:block>
							<!-- 尾页 -->
							<li>
								<a th:href="@{'/confofattr/conferenceCustomer?pageNum='+${pageInfo.lastPage}+'&&pid='+${pid}}">尾页</a>
							</li>
						</ul>
					</div>
				</div>

  <!-- 返回按钮 -->
					<div style="width:240px; height: 30px; position:fixed;left:727px;bottom:10px;">
						<a href="/conference/conferenceList" class="btn btn-primary">返回主页面</a>
						<button style="margin-left: 30px;" type="button" class="btn btn-primary" onclick="window.history.go(-1)">返回上一级</button>
					</div>

			</section>
			<!-- /.content -->
		</div>
		<!-- /.content-wrapper -->

	
 <!-- Main Footer -->
<div th:replace="footer::html" ></div>
		<div class="control-sidebar-bg"></div>
		
	</div>
<div th:replace="bottom::html" ></div>

	<script type="text/javascript">
	    $(function(){
			//进入添加页面
			$(document).on('click','#addPerson',function(){
				var pid=$("#conferenceId").val();
				window.location.href="/confofattr/addCustomer?conferenceId="+pid;
			}) 
		})
	</script>

</body>
</html>